﻿Imports System.Collections.Generic
Imports System.Data
Imports System.Data.SqlClient
Imports DoAnQuanLyBanHang1065043_1065007.DoAnQuanLyBanHang.General

Namespace DoAnQuanLyBanHang.DTO
    Public Class QuayGiaoDichData
        Private m_QuayGiaoDichData As New DataService()

        Public Function LayQuayGiaoDich() As DataTable
            Dim cmd As New SqlCommand("SELECT * FROM Quay_Giao_Dich")
            m_QuayGiaoDichData.Load(cmd)
            Return m_QuayGiaoDichData
        End Function

        Public Function ThemDongMoi() As DataRow
            Return m_QuayGiaoDichData.NewRow()
        End Function

        Public Sub ThemQuayGiaoDich(m_Row As DataRow)
            m_QuayGiaoDichData.Rows.Add(m_Row)
        End Sub

        Public Function LuuQuayGiaoDich() As Boolean
            Return m_QuayGiaoDichData.ExecuteNoneQuery() > 0
        End Function
    End Class
End Namespace
